typedef enum {TRUE = 1, FALSE = 0} boolean;

/***********/
/* Defines */
/***********/

/* SymTab field names */
#define S_OBJ 0
#define S_NEXT 1
#define S_MODE 2
#define S_SCOPE 3
#define S_USAGE 4
#define S_FILE_NO 5
#define S_NAME 6
#define S_SAMEHASH 7
#define S_TOKEN 8
#define S_HASHVAL 9
#define S_VARNUM 10
#define S_INITLEVEL 11
#define S_VTYPE 12
#define S_CODE 13
#define S_FIRSTLINE 14
#define S_TEMPS 15
#define S_OPCODE 16
#define S_NUM_ARGS 17
#define S_STACK_SPACE 18

/* S_MODE values */
#define M_NORMAL 0
#define M_CONSTANT 1
#define M_TEMP 2

/* S_SCOPE values */
#define SC_FREE 0   /* Temps only */
#define SC_IN_USE 1 /* Temps only */
#define SC_LOOP_VAR 2
#define SC_PRIVATE 3
#define SC_GLOOP_VAR 4
#define SC_LOCAL 5
#define SC_GLOBAL 6
#define SC_PREDEF 7
#define SC_KEYWORD 8
#define SC_UNDEFINED 9
#define SC_MULTIPLY_DEFINED 10

/* S_USAGE values */
/* Note : These are Gyroe only. */
#define U_VAR_UNUSED 3
#define U_VAR_READ 4
#define U_VAR_WRITTEN 5
#define U_VAR_RW 6
#define U_RT_UNCALLED 7
#define U_RT_CALLED 8

/* op_result return values */
#define T_ATOM 6
#define T_INTEGER 7
#define T_SEQUENCE 8
#define T_UNKNOWN 9

#define END 200
#define TO 201
#define BY 202
#define PROCEDURE 203
#define FUNCTION 204
#define THEN 205
#define DO 206
#define GLOBAL 207
#define RETURN 208
#define ELSIF 209
#define OBJECT 210
#define TYPE_DECL 211
#define CONSTANT 212
#define INCLUDE 213
#define WITH 214
#define WITHOUT 215
#define FUNC 216
#define ATOM 217
#define STRING 218
#define TYPE 219
#define SLICE 220
#define PLUS_EQUALS 221
#define MINUS_EQUALS 222
#define MULTIPLY_EQUALS 223
#define DIVIDE_EQUALS 224
#define CONCAT_EQUALS 225
#define NAMESPACE 226
#define GY_EOF 270

/* Links to SymTab fields of built-in types. */
#define INTEGER_TYPE 27
#define SEQUENCE_TYPE 28
#define OBJECT_TYPE 30
#define ATOM_TYPE 42

#ifdef LINUX_OS
 #define OS_DELIM ":"
 #define OS_SLASH '/'
 #define OS_SLASH_STR "/"
#elif WINDOWS_OS
 #define OS_DELIM ";"
 #define OS_SLASH '\\'
 #define OS_SLASH_STR "\\"
#endif

/* The rest of this is just a lump of codes.
   The negatives are mostly for helping scanner identify symbols.
   LESS to PLUS are used in scanner too, but are also opcodes
   so they probably won't be changed. Some of the gaps come from
   opcodes not handled by the frontend.
   ('For' loops are set to being general here, since there is usually
    not enough info to set a definite up or down.) */

#define VARIABLE -32
#define QUESTION_MARK -31
#define COMMA -30
#define RIGHT_SQUARE -29
#define LEFT_SQUARE -28
#define RIGHT_ROUND -27
#define LEFT_ROUND -26
#define RIGHT_BRACE -25
#define LEFT_BRACE -24
#define COLON -23
#define DOLLAR -22
#define END_OF_FILE -21
#define ILLEGAL_CHAR -20
#define NUMBER_SIGN -11
#define BLANK -8
#define DIGIT -7
#define NEWLINE -6
#define SINGLE_QUOTE -5
#define DOUBLE_QUOTE -4
#define DOT -3
#define LETTER -2
#define BANG -1

#define LESS 1
#define GREATEREQ 2
#define EQUALS 3
#define NOTEQ 4
#define LESSEQ 5
#define GREATER 6
#define NOT 7
#define AND 8
#define OR 9
#define MINUS 10
#define PLUS 11
#define UMINUS 12
#define MULTIPLY 13
#define DIVIDE 14
#define CONCAT 15
#define ASSIGN_SUBS 16
#define GETS 17
#define ASSIGN 18
#define PRINT 19
#define IF 20
#define FOR 21
#define ENDWHILE 22
#define ELSE 23
#define OR_BITS 24
#define RHS_SUBS 25
#define XOR_BITS 26
#define PROC 27
#define RETURNF 28
#define RETURNP 29
#define PRIVATE_INIT_CHECK 30
#define RIGHT_BRACE_N 31
#define REPEAT 32
#define GETC 33
#define RETURNT 34
#define APPEND 35
#define QPRINT 36
#define OPEN 37
#define PRINTF 38
#define ENDFOR_GENERAL 39
#define IS_AN_OBJECT 40
#define SQRT 41
#define LENGTH 42
#define BADRETURNF 43
#define PUTS 44
#define ASSIGN_SLICE 45
#define RHS_SLICE 46
#define WHILE 47

#define NOT_BITS 51

#define SPRINTF 53
#define ENDFOR_INT_UP1 54

#define AND_BITS 56
#define PREPEND 57
#define STARTLINE 58
#define CLEAR_SCREEN 59
#define POSITION 60
#define EXIT 61
#define RAND 62
#define FLOOR_DIV 63
#define TRACE 64
#define TYPE_CHECK 65
#define FLOOR_DIV2 66
#define IS_AN_ATOM 67
#define IS_A_SEQUENCE 68
#define DATE 69
#define TIME 70
#define REMAINDER 71
#define POWER 72
#define ARCTAN 73
#define LOG 74

#define COMPARE 76
#define FIND 77
#define MATCH 78
#define GET_KEY 79
#define SIN 80
#define COS 81
#define TAN 82
#define FLOOR 83
#define ASSIGN_SUBS_CHECK 84
#define RIGHT_BRACE_2 85
#define CLOSE 86
#define DISPLAY_VAR 87
#define ERASE_PRIVATE_NAMES 88
#define UPDATE_GLOBALS 89
#define ERASE_SYMBOL 90
#define GETENV 91
#define RHS_SUBS_CHECK 92
#define PLUS1 93
#define IS_AN_INTEGER 94
#define LHS_SUBS 95
#define INTEGER_CHECK 96
#define SEQUENCE_CHECK 97
#define DIV2 98
#define SYSTEM 99
#define COMMAND_LINE 100
#define ATOM_CHECK 101
#define LESS_IFW 102

#define NOT_IFW 108
#define GLOBAL_INIT_CHECK 109
#define MACHINE_FUNC 111
#define MACHINE_PROC 112
#define ASSIGN_I 113
#define RHS_SUBS_I 114
#define PLUS_I 115
#define MINUS_I 116
#define PLUS1_I 117
#define ASSIGN_SUBS_I 118
#define LESS_IFW_I 119
#define GREATEREQ_IFW_I 120
#define EQUALS_IFW_I 121
#define NOTEQ_IFW_I 122
#define LESSEQ_IFW_I 123
#define GREATER_IFW_I 124
#define FOR_I 125
#define ABORT 126
#define PEEK 127
#define POKE 128
#define CALL 129
#define PIXEL 130
#define GET_PIXEL 131
#define MEM_COPY 132
#define MEM_SET 133
#define C_PROC 134
#define C_FUNC 135
#define ROUTINE_ID 136

#define CALL_PROC 138
#define CALL_FUNC 139
#define POKE4 140
#define PEEK4S 141
#define PEEK4U 142
#define SC1_AND 143
#define SC2_AND 144
#define SC1_OR 145
#define SC2_OR 146
#define SC2_NULL 147
#define SC1_AND_IF 148
#define SC1_OR_IF 149
#define ASSIGN_SUBS2 150
#define ASSIGN_OP_SUBS 151
#define ASSIGN_OP_SLICE 152
#define PROFILE 153
#define XOR 154
#define EQUAL 155
#define SYSTEM_EXEC 156
#define PLATFORM 157

#define CONCAT_N 159
#define PLENGTH 162
#define LHS_SUBS1 163
#define PASSIGN_SUBS 164
#define PASSIGN_SLICE 165
#define PASSIGN_OP_SUBS 166
#define PASSIGN_OP_SLICE 167
#define LHS_SUBS1_COPY 168
#define TASK_CREATE 169
#define TASK_SCHEDULE 170
#define TASK_YIELD 171
#define TASK_SELF 172
#define TASK_SUSPEND 173
#define TASK_LIST 174
#define TASK_STATUS 175
#define TASK_CLOCK_STOP 176
#define TASK_CLOCK_START 177

